package com.yunduansing.demo.service;

import com.yunduansing.demo.entity.DictionaryCategoryEntity;
import com.yunduansing.demo.exception.RecordExistsException;
import com.yunduansing.demo.exception.ServiceException;
import com.yunduansing.demo.model.dictionary.DictionaryCategoryTreeModel;
import com.yunduansing.demo.model.dictionary.DictionaryPageRequestModel;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 字典类型 服务类
 * </p>
 *
 * @author yunduansing
 * @since 2020-05-24
 */
public interface DictionaryCategoryService extends IService<DictionaryCategoryEntity> {
    /**
     * 创建
     */
    boolean create(DictionaryCategoryEntity entity) throws RecordExistsException;
    /**
     * 修改
     */
    boolean update(DictionaryCategoryEntity entity) throws RecordExistsException;
    /**
     * 获取tree
     * @param enabled true:表示只获取启用的，否则获取启用和禁用的
     * @return
     */
    List<DictionaryCategoryTreeModel> getTree();
    /**
     * 删除
     */
    boolean delete(List<Integer> ids) throws ServiceException;
}
